package com.stuinfo;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class DeleteShow extends JDialog {
      /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	JTextField[] tf=new JTextField[3];
	
	
	public DeleteShow(JFrame jframe,boolean b) {
		super(jframe,b);
		JPanel pan =new JPanel();
		pan.setLayout(new GridBagLayout());
		
		 String[] str={"学号","姓名","性别"};
	        GridBagConstraints gbc = new GridBagConstraints();
	        
	        JLabel inla=new JLabel("请输入您要删除的学生学号");
	        gbc.gridx=1;
        	gbc.gridy=0;
        	gbc.insets=new Insets(20,20,20,20);
        	pan.add(inla,gbc);
	        
        	JTextField intf=new JTextField(5);
        	gbc.gridx=2;
        	gbc.gridy=0;
        	gbc.insets=new Insets(20,20,20,20);
        	pan.add(intf,gbc);
	        
        	
        	JButton inbt=new JButton("确定");
        	gbc.gridx=3;
        	gbc.gridy=0;
        	gbc.insets=new Insets(20,20,20,20);
        	pan.add(inbt,gbc);
        	
        	
	        for(int i=0;i<str.length;i++){
	        	JLabel la=new JLabel(str[i]);
	        	gbc.gridx=0;
	        	gbc.gridy=1+i;
	        	gbc.insets=new Insets(20,20,20,20);
	        	pan.add(la,gbc);
	        
	        
	        	tf[i]=new JTextField(20);
	        	gbc.gridx=1;
	     
	        	pan.add(tf[i],gbc);
	        	
	 
	        }
	        
	        JButton bt1=new JButton("确定删除");
	        gbc.gridx=2;
        	gbc.gridy=6;
        	gbc.insets=new Insets(20,20,20,20);
        	pan.add(bt1,gbc);
        	
        	
        	JButton bt2=new JButton("取消");
	        gbc.gridx=3;
        	gbc.gridy=6;
        	gbc.insets=new Insets(20,20,20,20);
        	pan.add(bt2,gbc);
	        
	        
	        
	        
	        add(pan);
		
		
		
		
	}
	
	
	
	
}
